import Vue from 'vue'
import Router from 'vue-router'

import login from './views/login.vue' //登录页面
import Layout from '@/layout/index.vue' //主框架

/*
注意：以前前端写的跳转方式：
左侧菜单列表是的 path 是后端返回，在这里写上对应的进行匹配
对应的数据是 storage.get('userInfo')
*/

// import stationMonitor from './views/stationMonitor.vue'               //水站监控
// import historyData from './views/historyData.vue'                     //历史数据
// import monitorDispatch from './views/monitorDispatch.vue'             //监控调度
// import monitorDispatchList from './views/monitorDispatchList.vue'     //调度列表

// import warningAdmin from './views/warningAdmin.vue'                   //预警管理

// import historyList from './views/historyList.vue'                     //历史列表
// import historyListDetail from './views/historyListDetail.vue'         //维修详情
// import contentPlot from './views/contentPlot.vue'                     //内容填写
// import operatingLog from './views/operatingLog.vue'                   //仪器有效运行记录
// import qualityRank from './views/qualityRank.vue'                     //水环境排名
// import qualityEvaluation from './views/qualityEvaluation.vue'         //水环境质量评价
// import qualityContrast from './views/qualityContrast.vue'             //水环境质量对比
// import polluteEventList from './views/polluteEventList.vue'           //污染溯源-污染列表
// import polluteEventUpload from './views/polluteEventUpload.vue'       //污染溯源-污染上传

// import mobileMonitorOverview from './views/mobileMonitorOverview.vue' //移动监测系统-数据概览
// import mobileMonitorDetail from './views/mobileMonitorDetail.vue'     //移动监测系统-数据概览-详情
// import mobileMonitorInput from './views/mobileMonitorInput.vue'       //移动监测系统-数据概览-详情
// import researchAnalysis from './views/researchAnalysis.vue'           //研判分析

// import assetAdminEntry from './views/assetAdminEntry.vue'             //资产管理 - 资产录入
// import assetAdminList from './views/assetAdminList.vue'               //资产管理 - 库存管理
// import assetCarAdmin from './views/assetCarAdmin.vue'                 //资产管理 - 车辆管理

// import watersStationList from './views/watersStationList.vue'         //水站档案 - 点位档案
// import watersStationDetail from './views/watersStationDetail.vue'     //水站档案 - 点位档案详情
// import watersStationInput from './views/watersStationInput.vue'       //水站档案 - 点位录入

// import watersDataInput from './views/watersDataInput.vue'             //企业档案 - 资料录入
// import watersDataList from './views/watersDataList.vue'               //企业档案 - 档案列表
// import watersDataDetail from './views/watersDataDetail.vue'           //企业档案 - 档案详情

// import dailyEventAdmin from './views/dailyEventAdmin.vue'             //日常管理 - 事件管理
// import dailyLogAdming from './views/dailyLogAdming.vue'               //日常管理 - 日志管理
// import dailyTaskAdming from './views/dailyTaskAdming.vue'             //日常管理 - 任务管理

// import systemFilesAdmin from './views/systemFilesAdmin.vue'           //系统管理 - 文件管理
// import systemUserAdmin from './views/systemUserAdmin.vue'             //系统管理 - 用户管理
// import systemUserDetail from './views/systemUserDetail.vue'           //系统管理 - 用户管理
// import systemAuditList from './views/systemAuditList.vue'             //系统管理 - 审核列表
// import systemFeedback from './views/systemFeedback.vue'               //系统管理 - 反馈列表

// import informationTechnical from './views/informationTechnical.vue'   //信息公开 - 技术档案
// import lawsRegulation from './views/lawsRegulation.vue'               //信息公开 - 法律法规

// import pointSetting from './views/pointSetting.vue'               //监测车 - 站点设置
// import historicalData from './views/historicalData.vue'               //监测车 - 历史数据

// import analysisFactor from './views/analysisFactor.vue'               //数据分析 - 因子超标时段分析
// import analysisWater from './views/analysisWater.vue'               //数据分析 - 水质分析
// import analysisDay from './views/analysisDay.vue'               //数据分析 - 日均值分析
// {
//   path: '/',
//   name: 'login',
//   component: () => import('./views/login.vue'),
//   meta: {
//     cName: '登录'
//   }
// },
Vue.use(Router)
export default new Router({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    // {
    //   path: '/',
    //   redirect: '/login',
    // },
    {
      path: '/login',
      name: 'login',
      component: login,
      meta: {
        cName: '登录'
      }
    },
    {
      path: '/',
      name: 'Layout',
      component: Layout,
      redirect: '/stationMonitor',
      meta: {
        cName: 'Layout'
      },
      children: [{
        path: 'stationMonitor',
        name: 'stationMonitor',
        // component: stationMonitor,
        component: () => import('./views/stationMonitor.vue'),
        meta: {
          cName: '监控列表'
        }
      },
      {
        path: 'historyData',
        name: 'historyData',
        component: () => import('./views/historyData.vue'),
        meta: {
          cName: '历史数据'
        }
      },
      {
        path: 'monitorDispatch',
        name: 'monitorDispatch',
        // component: monitorDispatch,
        component: () => import('./views/monitorDispatch.vue'),
        meta: {
          cName: '调度填写'
        }
      },
      {
        path: 'monitorDispatchList',
        name: 'monitorDispatchList',
        // component: monitorDispatchList,
        component: () => import('./views/monitorDispatchList.vue'),
        meta: {
          cName: '调度列表'
        }
      },
      {
        path: 'warningAdmin',
        name: 'warningAdmin',
        component: () => import('./views/warningAdmin.vue'),
        meta: {
          cName: '预警管理'
        }
      },
      {
        path: 'historyList',
        name: 'historyList',
        // component: historyList,
        component: () => import('./views/historyList.vue'),
        meta: {
          cName: '历史列表'
        }
      },
      {
        path: 'historyList/detail',
        name: 'historyListDetail',
        // component: historyListDetail,
        component: () => import('./views/historyListDetail.vue'),
        meta: {
          cName: '维修详情'
        }
      },
      {
        path: 'contentPlot',
        name: 'contentPlot',
        // component: contentPlot,
        component: () => import('./views/contentPlot.vue'),
        meta: {
          cName: '内容填写'
        }
      },
      {
        path: 'operatingLog',
        name: 'operatingLog',
        // component: operatingLog,
        component: () => import('./views/operatingLog.vue'),
        meta: {
          cName: '仪器有效运行记录'
        }
      },
      {
        path: 'qualityRank',
        name: 'qualityRank',
        // component: qualityRank,
        component: () => import('./views/qualityRank.vue'),
        meta: {
          cName: '水环境质量排名'
        }
      },
      {
        path: 'qualityEvaluation',
        name: 'qualityEvaluation',
        // component: qualityEvaluation,
        component: () => import('./views/qualityEvaluation.vue'),
        meta: {
          cName: '水环境质量评价'
        }
      },
      {
        path: 'qualityContrast',
        name: 'qualityContrast',
        // component: qualityContrast,
        component: () => import('./views/qualityContrast.vue'),
        meta: {
          cName: '水环境质量对比'
        }
      },
      {
        path: 'pollute/eventList',
        name: 'polluteEventList',
        // component: polluteEventList,
        component: () => import('./views/polluteEventList.vue'),
        meta: {
          cName: '污染列表'
        }
      },
      {
        path: 'pollute/eventUpload',
        name: 'polluteEventUpload',
        // component: polluteEventUpload,
        component: () => import('./views/polluteEventUpload.vue'),
        meta: {
          cName: '污染上传'
        }
      },
      {
        path: 'mobileMonitor/overview',
        name: 'mobileMonitorOverview',
        // component: mobileMonitorOverview,
        component: () => import('./views/mobileMonitorOverview.vue'),
        meta: {
          cName: '实时概览'
        }
      },
      {
        path: 'mobileMonitor/overview/detail',
        name: 'mobileMonitorDetail',
        // component: mobileMonitorDetail,
        component: () => import('./views/mobileMonitorDetail.vue'),
        meta: {
          cName: '实时概览详情'
        }
      },
      {
        path: 'mobileMonitor/overview/input',
        name: 'mobileMonitorInput',
        // component: mobileMonitorInput,
        component: () => import('./views/mobileMonitorInput.vue'),
        meta: {
          cName: '数据录入'
        }
      },
      {
        path: 'researchAnalysis',
        name: 'researchAnalysis',
        // component: researchAnalysis,
        component: () => import('./views/researchAnalysis.vue'),
        meta: {
          cName: '研判分析'
        }
      },
      {
        path: 'reportForms',
        name: 'reportForms',
        component: () => import('./views/reportForms.vue'),
        meta: {
          cName: '报告报表1'
        }
      },
      {
        path: 'assetAdmin/entry',
        name: 'assetAdminEntry',
        // component: assetAdminEntry,
        component: () => import('./views/assetAdminEntry.vue'),
        meta: {
          cName: '资产录入'
        }
      },
      {
        path: 'assetAdmin/list',
        name: 'assetAdminList',
        // component: assetAdminList,
        component: () => import('./views/assetAdminList.vue'),
        meta: {
          cName: '库存管理'
        }
      },
      {
        path: 'assetCarAdmin',
        name: 'assetCarAdmin',
        // component: assetCarAdmin,
        component: () => import('./views/assetCarAdmin.vue'),
        meta: {
          cName: '车辆管理'
        }
      },
      {
        path: 'waters/stationList',
        name: 'watersStationList',
        // component: watersStationList,
        component: () => import('./views/watersStationList.vue'),
        meta: {
          cName: '点位档案'
        },
      },
      {
        path: 'waters/stationDetail',
        name: 'watersStationDetail',
        // component: watersStationDetail,
        component: () => import('./views/watersStationDetail.vue'),
        meta: {
          cName: '点位档案详情'
        },
      },
      {
        path: 'waters/stationInput',
        name: 'watersStationInput',
        // component: watersStationInput,
        component: () => import('./views/watersStationInput.vue'),
        meta: {
          cName: '点位录入'
        },
      },
      {
        path: 'waters/dataInput',
        name: 'watersDataInput',
        // component: watersDataInput,
        component: () => import('./views/watersDataInput.vue'),
        meta: {
          cName: '资料录入'
        },
      },
      {
        path: 'waters/dataList',
        name: 'watersDataList',
        // component: watersDataList,
        component: () => import('./views/watersDataList.vue'),
        meta: {
          cName: '档案列表'
        },
      },
      {
        path: 'waters/dataDetail',
        name: 'watersDataDetail',
        // component: watersDataDetail,
        component: () => import('./views/watersDataDetail.vue'),
        meta: {
          cName: '档案详情'
        },
      },
      {
        path: 'daily/eventAdmin',
        name: 'dailyEventAdmin',
        // component: dailyEventAdmin,
        component: () => import('./views/dailyEventAdmin.vue'),
        meta: {
          cName: '事件管理'
        },
      },
      {
        path: 'daily/logAdming',
        name: 'dailyLogAdming',
        // component: dailyLogAdming,
        component: () => import('./views/dailyLogAdming.vue'),
        meta: {
          cName: '日志管理'
        },
      },
      {
        path: 'daily/taskAdming',
        name: 'dailyTaskAdming',
        // component: dailyTaskAdming,
        component: () => import('./views/dailyTaskAdming.vue'),
        meta: {
          cName: '任务管理'
        },
      },
      {
        path: 'system/filesAdmin',
        name: 'systemFilesAdmin',
        // component: systemFilesAdmin,
        component: () => import('./views/systemFilesAdmin.vue'),
        meta: {
          cName: '文件管理'
        },
      },
      {
        path: 'system/userAdmin',
        name: 'systemUserAdmin',
        // component: systemUserAdmin,
        component: () => import('./views/systemUserAdmin.vue'),
        meta: {
          cName: '用户管理'
        },
      },
      {
        path: 'systemAuditList',
        name: 'systemAuditList',
        // component: systemAuditList,
        component: () => import('./views/systemAuditList.vue'),
        meta: {
          cName: '审核列表'
        },
      },
      {
        path: 'system/userAdmin/detail',
        name: 'systemUserDetail',
        // component: systemUserDetail,
        component: () => import('./views/systemUserDetail.vue'),
        meta: {
          cName: '用户详情'
        },
      },
      {
        path: 'system/feedback',
        name: 'feedback',
        // component: systemFeedback,
        component: () => import('./views/systemFeedback.vue'),
        meta: {
          cName: '反馈列表'
        },
      },
      {
        path: 'system/resource',
        name: 'resourceAdmin',
        component: () => import('./views/resourceAdmin.vue'),
        meta: {
          cName: '菜单管理'
        },
      },
      {
        path: 'system/roles',
        name: 'rolesAdmin',
        component: () => import('./views/rolesAdmin.vue'),
        meta: {
          cName: '角色管理'
        },
      },
      {
        path: 'information/technical',
        name: 'informationTechnical',
        // component: informationTechnical,
        component: () => import('./views/informationTechnical.vue'),
        meta: {
          cName: '技术档案'
        },
      },
      {
        path: 'information/lawsRegulation',
        name: 'lawsRegulation',
        // component: lawsRegulation,
        component: () => import('./views/lawsRegulation.vue'),
        meta: {
          cName: '法规标准'
        },
      },
      {
        path: 'information/standard',
        name: 'informationStandard',
        component: () => import('./views/informationStandard.vue'),
        meta: {
          cName: '排放标准'
        },
      },
      {
        path: 'transportAdmin',
        name: 'transportAdmin',
        component: () => import('./views/transportAdmin.vue'),
        meta: {
          cName: '废液转运'
        },
      },
      {
        path: 'equipmentAdmin',
        name: 'equipmentAdmin',
        component: () => import('./views/equipmentAdmin.vue'),
        meta: {
          cName: '设备管理'
        },
      },
      {
        path: 'emergencyOperation',
        name: 'emergencyOperation',
        component: () => import('./views/emeOperation.vue'),
        meta: {
          cName: '应急运维'
        }
      },
      {
        path: 'dailyOperation',
        name: 'dailyOperation',
        component: () => import('./views/dailyOperation.vue'),
        meta: {
          cName: '日常运维'
        }
      },
      {
        path: 'cycleSettings',
        name: 'cycleSettings',
        component: () => import('./views/cycleSettings.vue'),
        meta: {
          cName: '运维周期提醒'
        }
      },
      {
        path: 'stationSelect',
        name: 'stationSelect',
        component: () => import('./views/stationSelect.vue'),
        meta: {
          cName: '点位选择'
        }
      },
      {
        path: 'warningWay',
        name: 'warningWay',
        component: () => import('./views/warningWay.vue'),
        meta: {
          cName: '预警提醒设置'
        }
      },
      {
        path: 'report',
        name: 'report',
        component: () => import('./views/report.vue'),
        meta: {
          cName: '报告报表'
        }
      },
      {
        path: 'dataAnalysis',
        name: 'dataAnalysis',
        component: () => import('./views/dataAnalysis.vue'),
        meta: {
          cName: '数据分析'
        }
      },
      {
        path: 'analysis/factor',
        name: 'analysisFactor',
        component: () => import('./views/analysisFactor.vue'),
        meta: {
          cName: '因子超标时段分析'
        }
      },
      {
        path: 'analysis/water',
        name: 'analysisWater',
        component: () => import('./views/analysisWater.vue'),
        meta: {
          cName: '水质分析'
        }
      },
      {
        path: 'analysis/day',
        name: 'analysisDay',
        component: () => import('./views/analysisDay.vue'),
        meta: {
          cName: '日均值分析'
        }
      },
      {
        path: 'car/pointSetting',
        name: 'pointSetting',
        component: () => import('./views/pointSetting.vue'),
        meta: {
          cName: '监测车点位设置'
        }
      },
      {
        path: 'car/historicalData',
        name: 'historicalData',
        component: () => import('./views/historicalData.vue'),
        meta: {
          cName: '监测车历史数据'
        }
      },
      {
        path: 'system/factorSetting',
        name: 'factorSetting',
        component: () => import('./views/factorSetting.vue'),
        meta: {
          cName: '因子配置设置'
        }
      },
      {
        path: 'analysis/analysisComparison',
        name: 'analysisComparison',
        component: () => import('./views/analysisComparison.vue'),
        meta: {
          cName: '同比环比分析'
        }
      },
      {
        path: 'analysis/analysisOver',
        name: 'analysisOver',
        component: () => import('./views/analysisOver.vue'),
        meta: {
          cName: '超标时段分析'
        }
      }
      ]
    },

    {
      path: '/testmap',
      name: 'testmap',
      component: () => import('./views/testmap.vue'),
      meta: {
        cName: '测试地图'
      },
    },
    {
      path: '/404',
      name: '404',
      component: () => import('@/views/404Page.vue')
    },
    {
      path: '*', // 此处需特别注意放在最底部
      redirect: '/404'
    }
  ]
})
